<%@ page contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ page language="java"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/common.jsp"%>
<s:hidden name="siteLogoPhysicalPath"/>
<s:hidden name="upType" id="lx"/>
<script type="text/javascript">
	 $("input[name=picturePhysicalPath]",parent.document).val($("input[name=picturePhysicalPath]").val());
	 $("input[name=pictureDbPath]",parent.document).val('<s:property value="pictureDbPath"/>');
	 $("input[name=attachName]",parent.document).val('<s:property value="contentAttach.attachName"/>'); 
	 $("input[name=attachType]",parent.document).val('<s:property value="contentAttach.attachType"/>');
	 $("input[name=attachExt]",parent.document).val('<s:property value="contentAttach.attachExt"/>');
	 $("input[name=attachUrl]",parent.document).val('<s:property value="contentAttach.attachUrl"/>');
	 $("input[name=attachSize]",parent.document).val('<s:property value="contentAttach.attachSize"/>');
	 $("input[name=attachMemo]",parent.document).val('<s:property value="contentAttach.attachMemo"/>');
	 $("input[name=uploadOriginName]",parent.document).val('<s:property value="contentAttach.uploadOriginName"/>');
	 
	var lx = $("#lx").val();
	$(function(){
		$.ajaxSetup({
			cache:false
		});
			$("#pictemp2",parent.document).attr("src",'<s:property value="uploadUrl"/><s:property value="pictureDbPath"/>');
			$("#pictemp2",parent.document).load(function(){
				$(".loading",parent.parent.document).remove();
				$(".shadow",parent.parent.document).remove();
			}).error(function() {
				if($("#pictemp2",parent.document).attr("src")=="justdoit.jpg") {
					setTimeout(function(){
						$("#pictemp2",parent.document).attr("src",'<s:property value="uploadUrl"/><s:property value="pictureDbPath"/>');
					},1000);
				}else {
					setTimeout(function(){
						$("#pictemp2",parent.document).attr("src",'justdoit.jpg');
					},1000);
				}
	        }) ;
	});
</script>
